package com.hwl.lab.unit;

import com.hwl.lab.entity.User;
import com.hwl.lab.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

//缓存用户信息
@Service
public class Usercache {
    @Autowired
    private UserRepository userRepository;
    private User user;

    public User UserMegs(String userid) {
         this.user = userRepository.findByUserid(userid);
        return user;
    }
    public User getUser() {
        return this.user;
    }
}
